<?php
declare (strict_types = 1);

namespace app\common\validate;

use think\Validate;
class StudyClassSign extends Validate
{
    protected $rule = ['class_id' => 'require|number','add_time' => 'require|number','student_count' => 'require|number','level_count' => 'require|number',
    ];

    protected $message = ['class_id.require' => '班级ID为必填项','class_id.number' => '班级ID需为数字','add_time.require' => '打卡时间为必填项','add_time.number' => '打卡时间需为数字','student_count.require' => '班级人数为必填项','student_count.number' => '班级人数需为数字','level_count.require' => '缺勤人数为必填项','level_count.number' => '缺勤人数需为数字',
    ];

    /**
     * 添加
     */
    public function sceneAdd()
    {
        return $this->only(['class_id','add_time','student_count','level_count',]);
    }

    /**
     * 编辑
     */
    public function sceneEdit()
    {
        return $this->only(['class_id','add_time','student_count','level_count',]);
    }
}
